package com.mbbb.test;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * 任务类：每隔两秒执行一次
 */
public class HelloJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        String name = (String) jobExecutionContext.getJobDetail().getJobDataMap().get("name");
        System.out.println("jobExecutionContext = " + jobExecutionContext);
        System.out.println("name = " + name);
    }
}
